Skip to content

Constrain file snapshots to trusted directory handles - #39

Merged
bytetroll merged 5 commits into
nil-sockets-entropy-bytesfrom
codex/web-rooted-file-snapshots
Nov 13, 2026
Merged

bytetroll merged 5 commits into
nil-sockets-entropy-bytesfrom
codex/web-rooted-file-snapshots

Conversation

@bytetroll

Copy link
Copy Markdown
Contributor

Static web roots previously had no filesystem primitive that constrained intermediate symlinks or Windows reparse points. read_rooted_snapshot now opens each descendant relative to an already-open directory and returns the bounded bytes, same-handle modification time, and SHA-256 of those bytes. This also replaces per-byte interpreted hashing on the web request path.

The snapshot record works through interpreted, AOT and JIT routes. A bulk text.from_bytes conversion supports the existing interpreter web response layer; native compilation rejects that conversion explicitly until native text supports embedded NUL. Exact record schemas and boxed byte-array identity remain checked.

Validation: 87 Linux host checks; five focused CTest contracts passed, including existing UTF-8, dynamic-value and native-runtime regressions. New language controls cover text/binary NIL, AOT/JIT, same-size preserved-timestamp replacement, boxing/GC, invalid type extraction and invalid native declarations. The web suite passes 1,128 checks and 15 real static HTTP cases. Four-host CI exercises Windows and Intel/Apple Silicon macOS directly; cross-compilation alone is not reported as native execution. Changed tracked files passed the redacted secrets scan.

This PR is based on #38 (nil-sockets-entropy-bytes) and does not publish or replace an SDK release.

…napshots

# Conflicts:
#	.github/workflows/web-runtime-parity.yml
#	notebook/README.md
@bytetroll
bytetroll merged commit 7c38c55 into nil-sockets-entropy-bytes Nov 13, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant